<template>
  <a-modal
    title="操作"
    :width="800"
    :visible="visible"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <iframe frameborder="0" scrolling="no" allowtransparency="yes"
            width="750" height="600" id="authIFrame" src=""/>
  </a-modal>
</template>
<script>

  export default {
    //--############  data() ###############-->
    data() {
      return {
        visible: false,
      }
    },
    //--############  data() ###############-->

    created() {
    },

    //--############  methods() ###############-->
    methods: {
      edit(record) {
        this.visible = true
        document.getElementById("authIFrame").setAttribute("src", this.$baseURL + "/wxopen/authGo?companyId=" + record.id);
        //document.getElementById("authIFrame").setAttribute("src", "http://admin.alipayjf.com/wxopen/authGo?companyId=" + record.id);
      },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleOk() {
        const _this = this
        // 触发表单验证
        _this.$emit('ok')
        _this.close()
      },
      handleCancel() {
        this.close()
      },

    }
    //--############  methods() ###############-->
  }
</script>